#ifndef __LOGIN_H__
#define __LOGIN_H__

#include <stdbool.h>

typedef struct user
{
    char ID[20];//用户账号
    char passwd[20];//用户密码
}User;

typedef struct user Typedata;
typedef struct loginuser
{
    Typedata data;//存储用户数据域
    struct loginuser *next;
}User_t,*P_User_t;
 

typedef struct 
{
    char id[20];//管理员账号
    char passwaord[20];//管理员密码
}Manager;

// int UserRegister(User *p);
int UserRegister(P_User_t p);
int ManagerRegister(Manager *p);
// int UserLogin(User *p,  int a);
int UserLogin(P_User_t p,  int a);
int ManagerLogin( Manager *p, int b);

bool InitUser(P_User_t *p);
bool AddUser(P_User_t p);
bool ShowUser(P_User_t p);

// int Register(User *user,Manager *manager,int *a);
// int Login(User *user, Manager *manager, int *b,int a);
int Register(P_User_t HEAD, Manager *manager, int *a);
int Login(P_User_t HEAD, Manager *manager, int *b,int a);


#endif